
public class Jail {
	
	public static Player turns(Player a) {
				
		a.setJailCounter(a.getJailCounter()-1);
		
		if (a.getJailCounter() == 0) {
			
			a.setJail(false);
			a.resetLastThreeRolls();
			a = Jail.payFine(a);
		}
		
		return a;
	}
	
	public static Player payFine(Player a) {
		
		if (a.getCash() >= 25) {
			
			a.setCash(a.getCash()-25);
		}
		
		else {
			//PROMPT
		}
		
		Object[] options = { "Okay." };
		
		BoardGUI.dynamicDialogBox(options, "images/Misc/Bail Paid.png", "Fine Paid");
		
		return a;
	}
	
	public static boolean threeDoubles(Player a) {
		
		int[][] x = a.getLastThreeRolls();
		
		if (x[0][0] != x[0][1] || x[0][0] == 0) {
			
			//System.out.println(x[0][1] + " " + x[0][0]);
			return false;
		}
		
		if (x[1][0] != x[1][1] || x[1][0] == 0) {
			
			//System.out.println(x[2][1] + " " + x[0][0]);
			return false;
		}
		
		if (x[2][0] != x[2][1] || x[2][0] == 0) {
			
			//System.out.println(x[2][1] + " " + x[0][0]);
			return false;
		}
		
		//System.out.println(true);
		return true;
	}
}
